{% extends 'ZaysoAreaBundle:Layout:layout.html.twig' %}

{% block title %}Area - Assign{% endblock %}

{% block content %}
<div>
<form method="post" action="{{ path('zayso_area_schedule_referee_assign') }}">
<table border="2" class="form_table" width="600">
<input type="hidden" name="gameId" value="{{ game.id }}" />
    <tr><th colspan="2">Referee Assignmnet</th></tr>
    <tr>
        <td style="width: 150px;">Game Number</td><td>{{ game.num }}</td>
    </tr><tr>
        <td>Date</td><td>{{ gameView.date }}</td>
    </tr><tr>
        <td>Time</td><td>{{ gameView.time }}</td>
    </tr><tr>
        <td>Field</td><td>{{ gameView.field }}</td>
    </tr><tr>
        <td>Home Team</td><td>{{ gameView.homeTeam }}</td>
    </tr><tr>
        <td>Away Team</td><td>{{ gameView.awayTeam }}</td>
    </tr>
    <tr><td colspan="2"></td></tr>
    {% for gamePerson in game.getEventPersonsSorted %}
        <input type="hidden" name="eventPerson[{{gamePerson.id}}][id]"   value="{{ gamePerson.id   }}" />
        <input type="hidden" name="eventPerson[{{gamePerson.id}}][type]" value="{{ gamePerson.type }}" />
        <input type="hidden" name="eventPerson[{{gamePerson.id}}][personId]" value="{{ gamePerson.personId }}" />
        <tr>
            <td>{{ gamePerson.typeDesc }}</td>
            <td>{{ gameView.genEventPersonName(gamePerson) | raw }}</td>
        </tr>
    {% endfor %}
    <tr>
        <td><a href="{{ path('zayso_area_schedule_referee_list') }}#ref-sched-{{game.num}}">Referee Schedule</a></td>
        <td><input type="submit" name="refereeAssignSubmit" value="Sign Up" /></td>
    </tr>
</table>
</form>
</div>
</div>
{% endblock %}
